package com.example.huainanlive.factory.s

import com.demon.net.IAppResponse


class AppResponseThrid<T> : IAppResponse<T> {

  var code: Int = 0
  var msg :T?= null

  companion object {
    const val CODE_SUCCESS = 0
  }

  override fun isSuccess(): Boolean = code == CODE_SUCCESS

  override fun isFailed(): Boolean = code != CODE_SUCCESS

  override fun isExpired(): Boolean {
    return false
  }

  override fun getResponseCode(): Int = code

  override fun getResponseMessage(): String = msg.toString()

  override fun getResponseData(): T? = msg

}